package event;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;

/**
 * @program: javaLearn
 * @description:
 * @author: renhai
 * @Date ：2021/12/24 15:23
 **/
public class MyJGrame extends JFrame {

    public MyJGrame() {
        super("事件监听器接口的简单例子");
        this.setBounds(400, 400, 400, 400);
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);
        Container c = this.getContentPane();
//        c.addMouseListener(new MyMouseListener(c));
        c.addMouseListener(new MyMouseLister2(c));
        this.setVisible(true);
    }


    public static void main(String[] args) {
        new MyJGrame();
    }

}
